#ifndef CONTIGBROWSERMENUBAR_H
#define CONTIGBROWSERMENUBAR_H

#include <QObject>
#include <QGraphicsWidget>
#include <QRect>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
#include <QPainterPath>
#include <QPushButton>
#include <QGraphicsProxyWidget>
#include <QGraphicsLinearLayout>
#include <QProgressBar>
#include <QLabel>
#include <QComboBox>
#include <QGraphicsLineItem>
#include <QLineF>

class BacterialContigBrowser;

class ContigBrowserMenuBar : public QGraphicsWidget
{
    Q_OBJECT
public:
    explicit ContigBrowserMenuBar( BacterialContigBrowser *parent = 0 );

    //these allow elts to be drawn
    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

    void setWidth(float newWidth);
    void setHeight(float newHeight);

    void updateProgressBar(int);
    void updateProgressMessage(QString);
    void resetProgressBar();
signals:
    void sortSignal(int sortType);

public slots:
    void sortButtonClickedSlot();

private:
    float width;
    float height;

    QGraphicsLinearLayout* layout;

//    QList< QGraphicsLineItem* > lines;
//    QList< QGraphicsLayoutItem* > lineLayoutItems;
    //QList< QGraphicsProxyWidget* > lineProxys;

    QLabel* progressLabel;
    QGraphicsProxyWidget* progressLabelProxy;

    QProgressBar* progressBar;
    QGraphicsProxyWidget* progressBarProxy;

    QPushButton* exportButton;
    QGraphicsProxyWidget* exportProxyButton;

    QComboBox* sortByComboBox;
    QGraphicsProxyWidget* sortByComboBoxProxy;

    QPushButton* sortButton;
    QGraphicsProxyWidget* sortButtonProxy;
    
};

#endif // CONTIGBROWSERMENUBAR_H
